import { createApp } from "vue"
import { createPinia } from "pinia"
import App from "./App.vue"

import "./assets/main.scss"
import { persist } from "@/stores/plugins/persist"
import "moment/dist/locale/zh-cn.js"
import "moment/locale/zh-cn.js"
import {
  create,
  NButton,
  NPopover,
  NDropdown,
  NSpin,
  NInput,
  NSlider,
  NRadioGroup,
  NRadioButton,
  NSelect,
  NSwitch
} from "naive-ui"

const naive = create({
  components: [
    NButton,
    NPopover,
    NDropdown,
    NSpin,
    NInput,
    NSlider,
    NRadioGroup,
    NRadioButton,
    NSelect,
    NSwitch
  ]
})

const app = createApp(App)
app.use(naive)

//添加状态持久化插件
const pinia = createPinia()
pinia.use(persist)
app.use(pinia)

app.mount("#app")
